#!/usr/bin/perl

my $sep = "1	\\n	\\n	\\n	\\n	-	0	ROOT\n\n";
my @sentence = ();

while (my $line = <>) {
	# Reset sentence
	if ($line =~ /^\s*$/) {
		@sentence = ();
		print $sep;
	} else {
		# Set head to 0
		my @args = split(/\t/, $line);
		@args[6] = "0";
		$line = join("\t", @args);

		# Print
		push @sentence, $line;
		print join("", @sentence), "\n";
		print $sep;
	}
}
